<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><{$tt}></title>
<link href="<{$smarty.const.BASEPATH}>/css/tablecss.css" rel="stylesheet">
<link href="<{$smarty.const.BASEPATH}>/css/css.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<{$smarty.const.WEBDIR}>js/jquery.min.js"></script>
</head>

<body>
<div class="mainfolat">
<div class="divtitle"><span style="float:left;"><strong>◆<{$tt}></strong></span></div>

<input type="hidden" name="selids" value=""/>
<table class="table">

    <tr><td colspan="3" bgcolor="#DEEFFA" height="40">SQLITE数据库</td></tr>
	<tr class="table-content" onmouseover="javascript:this.bgColor='#FFFF98'" onmouseout="javascript:this.bgColor='#FFFFFF'">
		<td class="td1 border-td">备份数据</td>
		<td class="td3 border-td" colspan="2"><input type="button" value="现在备份" id="nowbf"/>
        </td><td></td>
	</tr>
	<tr class="table-content" onmouseover="javascript:this.bgColor='#FFFF98'" onmouseout="javascript:this.bgColor='#FFFFFF'">
		<td class="td1 border-td">压缩数据</td>
		<td class="td3 border-td" colspan="2"><input type="button" value="现在压缩" id="nowys"/>危险，压缩前请先备份,你备份了嘛???
        </td><td></td>
	</tr>
    <tr><td colspan="3" bgcolor="#FFFF98">历史数据库</td></tr>
    <{$ii=1}>
    <{foreach item=item name=name from=$dbarr}> 
	<tr class="table-content" onmouseover="javascript:this.bgColor='#FFFF98'" onmouseout="javascript:this.bgColor='#FFFFFF'">
		<td class="td1 border-td">数据<{$ii}></td>
		<td class="td3 border-td" colspan="2"><{$item}>  <a href="<{spUrl c=data a=down db=$item}>" onClick="return confirm('提示，你是要下载嘛???')">下载</a> | <a href="<{spUrl c=data a=sqlite_hy db=$item}>" onClick="return confirm('危险，请备份后在确认还原！！！')">还原</a> | <a href="<{spUrl c=data a=deldb db=$item}>" onClick="return confirm('警告！确认删除吗？')">删除</a></td><td></td>
	</tr>
    <{$ii=$ii+1}>
    <{/foreach}> 
</table>
<div id="waiting"></div>
<script type="text/javascript">
$(function(){ // 当页面加载完毕的时候

 $("#nowbf").click(
 function(){
     $("#waiting").css("display","block"); 
     $("#waiting").ajaxStart(function(){$(this).html("<img src='<{$smarty.const.BASEPATH}>/images/Wait.gif' alt='Loading...'/>");});
	 var formdata = {
    			//'action' : 'nowbf'
		      };
	 $.getJSON("<{spUrl c=data a=nowbf action=Sqlite}>", formdata, function(json){
                if(json.status==1){
                    $("#waiting").html("<img src='<{$smarty.const.BASEPATH}>/images/ok.gif' alt='ok'/> <br/>"+ json.message);
                    setTimeout(function(){
					   $("#waiting").css("display","none");
                       location.href="<{spUrl c=data a=index}>";
				    },2000);
                    
                }else{
                    $("#waiting").html("<img src='<{$smarty.const.BASEPATH}>/images/sb.gif' alt='sb'/> <br/>"+ json.message);
                    setTimeout(function(){
					   $("#waiting").css("display","none");
				    },2000);
                }
            }); 
                
});
 $("#nowys").click(
 function(){
     $("#waiting").css("display","block"); 
     $("#waiting").ajaxStart(function(){$(this).html("<img src='<{$smarty.const.BASEPATH}>/images/Wait.gif' alt='Loading...'/>");});
	 var formdata = {
    			//'action' : 'nowbf'
		      };
	 $.getJSON("<{spUrl c=data a=nowys action=Sqlite}>", formdata, function(json){
                if(json.status==1){
                    $("#waiting").html("<img src='<{$smarty.const.BASEPATH}>/images/ok.gif' alt='ok'/> <br/>"+ json.message);
                    setTimeout(function(){
					   $("#waiting").css("display","none");
                       location.href="<{spUrl c=data a=index}>";
				    },2000);
                    
                }else{
                    $("#waiting").html("<img src='<{$smarty.const.BASEPATH}>/images/sb.gif' alt='sb'/> <br/>"+ json.message);
                    setTimeout(function(){
					   $("#waiting").css("display","none");
				    },2000);
                }
            }); 
                
});
});

</script>
</div> 
</body>

</html>